package rmmk.zadanie1;

import java.util.ArrayList;
import java.util.HashMap;

import org.junit.Test;

public class Experiments2 {

	int from = 10000;
	int upTo = 100000;
	int step = 10000;

	@Test
	public void normal() {
		HashMap<Integer, ArrayList<Long>> values = new HashMap<Integer, ArrayList<Long>>();
		
		SortingManager sm = new SortingManager();
		sm.addAlg(new Recurcively2());
		
		
		for (int size = from; size <= upTo; size += step) {
			ArrayList<Long> ret = sm.analize(DataSource.getNormal(size));
			values.put(size, ret);
		}

		LatexOutput lx = new LatexOutput();
		lx.printLatexOutput("normal", values);
		
	}
	
	@Test
	public void pesym(){
		HashMap<Integer, ArrayList<Long>> values = new HashMap<Integer, ArrayList<Long>>();
		
		SortingManager sm = new SortingManager();
		sm.addAlg(new Recurcively2());
		
		for (int size = from; size <= upTo; size += step) {
			ArrayList<Long> ret = sm.analize(DataSource.getPesymistic(size));
			values.put(size, ret);
		}

		LatexOutput pesym = new LatexOutput();
		pesym.printLatexOutput("pesym", values);
	}

	@Test
	public void optim() {
		HashMap<Integer, ArrayList<Long>> values = new HashMap<Integer, ArrayList<Long>>();
		SortingManager sm = new SortingManager();
		sm.addAlg(new Recurcively2());
		
		for (int size = from; size <= upTo; size += step) {
			ArrayList<Long> ret = sm.analize(DataSource.getOptimal(size));
			values.put(size, ret);
		}

		LatexOutput optim = new LatexOutput();
		optim.printLatexOutput("optim", values);
	}
}
